package com.paic.mhis.hcpms.trust.web.vo;

import java.util.Map;

import org.apache.commons.lang.StringUtils;

/**
 * @Description 常量类
 * @date 2015/01/29
 */
public class TrustUtil {
	/**
	 * 组装参数
	 * 
	 * @param paramMap
	 * @param search
	 */
	public static void paramMap(Map<Object, Object> paramMap, IntegrityMedicalVO search) {
		paramMap.put("startDate", StringUtils.isEmpty(search.getStartDate()) ? null : search.getStartDate());
		paramMap.put("endDate", StringUtils.isEmpty(search.getEndDate()) ? null : search.getEndDate());
		if (StringUtils.isNotEmpty(search.getDoctorCode())) {
			String[] paramStr = search.getDoctorCode().split("\\；\\s*|;\\s*|,\\s*|，\\s*");
			paramMap.put("doctorCode", paramStr);
		} else {
			paramMap.put("doctorCode", null);
		}
		if (StringUtils.isNotEmpty(search.getOrgCode())) {
			String[] paramStr = search.getOrgCode().split("\\；\\s*|;\\s*|,\\s*|，\\s*");
			paramMap.put("orgCode", paramStr);
		} else {
			paramMap.put("orgCode", null);
		}
		if (StringUtils.isNotEmpty(search.getActCurrent())) {
			String paramStr = search.getActCurrent();
			paramMap.put("actCurrent", paramStr);
		} else {
			paramMap.put("actCurrent", null);
		}
	}
}
